Relax Textual constraint from == to >=#196
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThis PR relaxes the textual dependency requirement in ChangesTextual Dependency Update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pyproject.toml`:
- Line 25: Update the textual dependency entry in pyproject.toml to add an upper
bound to prevent future breaking major releases; replace the existing
"textual>=6.5.0" constraint with a ranged constraint such as
"textual>=6.5.0,<9.0" so the project still receives minor/patch updates but is
protected from incompatible v9+ changes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: b1e01c9a-a565-4249-b089-d3385fd83e9a
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (1)
pyproject.toml
| "mistune>=3.1.4", | ||
| "toml>=0.10.2", | ||
| "textual==6.5.0", | ||
| "textual>=6.5.0", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Verify that Select widget (affected by Select.BLANK → Select.NULL breaking change) is not used
echo "=== Checking for Select widget usage ==="
rg -nP --type=py '\bSelect\b' -C3
echo -e "\n=== Checking for Select.BLANK usage ==="
rg -nP --type=py 'Select\.BLANK' -C3Repository: daaain/claude-code-log
Length of output: 7386
🏁 Script executed:
#!/bin/bash
# Description: Check screen dismissal patterns to verify the dismissing non-active screen breaking change impact
echo "=== Checking for screen dismiss() calls ==="
rg -nP --type=py '\.dismiss\(' -C3
echo -e "\n=== Checking for ModalScreen usage ==="
rg -nP --type=py 'ModalScreen' -C3Repository: daaain/claude-code-log
Length of output: 6363
🌐 Web query:
Textual Python TUI library changelog breaking changes since version 8.0.0
💡 Result:
As of June 3, 2026, version 8.0.0 is a historical release of the Textual library (released February 16, 2026) [1][2]. The primary breaking change introduced in version 8.0.0 was the renaming of the Select.BLANK constant to Select.NULL to resolve a naming conflict with the newly introduced Widget.BLANK Classvar [1][3][4]. Additional behavioral changes noted in the 8.0.0 release that may impact existing applications include: 1. Screen Dismissal Behavior: Dismissing a non-active screen is no longer a no-op (no-operation) and no longer triggers a warning [1][3]. While the dismissal still functions, users should be aware that the screen may not update if the current mode is not active [1][5]. 2. Screen Switching Delay: A 50ms delay was added when switching screens to allow for state updates and to prevent visual flickering (janky flash) of old content [1][3]. Since version 8.0.0, there have been no further breaking changes documented in the official changelog up to version 8.2.7 (current as of May 2026) [2][6]. Subsequent releases (8.1.0 through 8.2.7) have primarily focused on additive features, performance improvements (such as smooth scrolling for large documents), and bug fixes [2][6].
Citations:
- 1: https://github.com/Textualize/textual/releases/tag/v8.0.0
- 2: https://pypi.org/project/textual/
- 3: https://github.com/Textualize/textual/blob/main/CHANGELOG.md
- 4: https://newreleases.io/project/github/Textualize/textual/release/v8.0.0
- 5: https://github.com/Textualize/textual/blob/v8.2.1/CHANGELOG.md
- 6: https://github.com/Textualize/textual/releases
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== Search for Textual Select widget imports/usage ==="
rg -n --type=py "textual\.widgets.*Select|from textual\.widgets import .*Select|Select\(" .
echo "=== Search for Select.* enum/constant usage (other than Select.BLANK) ==="
rg -n --type=py "Select\.[A-Z0-9_]+" .
echo "=== Search for dismiss() calls on anything other than 'self' ==="
rg -n --type=py "\b[A-Za-z_][A-Za-z0-9_]*\.dismiss\(" .
echo "=== Search for 'dismiss(' within ModalScreen subclasses ==="
rg -n --type=py "class .*ModalScreen.*:[\s\S]{0,200}?\n\s+def .*action_.*|class .*ModalScreen.*|self\.dismiss\(" claude_code_log/tui.pyRepository: daaain/claude-code-log
Length of output: 121
🏁 Script executed:
#!/bin/bash
set +euo pipefail
echo "=== Search for Textual Select widget imports/usage ==="
rg -n --type=py "textual\.widgets.*Select|from textual\.widgets import .*Select|Select\(" . || true
echo "=== Search for Select.* enum/constant usage (other than Select.BLANK) ==="
rg -n --type=py "Select\.[A-Z0-9_]+" . || true
echo "=== Search for dismiss() calls on anything other than 'self' ==="
rg -n --type=py "\b[A-Za-z_][A-Za-z0-9_]*\.dismiss\(" . || true
echo "=== Search for 'dismiss(' within ModalScreen subclasses ==="
rg -n --type=py "class .*ModalScreen.*:.*(\n.*){0,80}self\.dismiss\(" claude_code_log/tui.py || trueRepository: daaain/claude-code-log
Length of output: 1298
Add an upper bound to the textual dependency
- v8.0.0’s breaking changes don’t appear to affect this tool: no
textual.widgets.Select/Select.*usage found in the codebase, anddismiss()calls are limited toself.dismiss(...)withinModalScreenaction methods. - Still,
textual>=6.5.0with no upper bound lets future major releases break the app; constrain it (e.g.,<9.0).
Suggested constraint
- "textual>=6.5.0",
+ "textual>=6.5.0,<9.0",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "textual>=6.5.0", | |
| "textual>=6.5.0,<9.0", |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pyproject.toml` at line 25, Update the textual dependency entry in
pyproject.toml to add an upper bound to prevent future breaking major releases;
replace the existing "textual>=6.5.0" constraint with a ranged constraint such
as "textual>=6.5.0,<9.0" so the project still receives minor/patch updates but
is protected from incompatible v9+ changes.
There was a problem hiding this comment.
I'm not sure if I want to add a hard upper bound, isn't it better for the library consumers to decide? We have a uv.lock and if there's a breakage later we can see how to deal with it.
There was a problem hiding this comment.
@daaain, that's a fair point. For an application shipped with a uv.lock, the lockfile already pins exact versions for reproducible installs, so an upper bound in the constraint adds less value than it would for a pure library. The PR's goal of easing Nixpkgs packaging also aligns better with a looser bound. Happy to leave it as >=6.5.0.
( ˶ᵔ ᵕ ᵔ˶ )
✏️ Learnings added
Learnt from: daaain
Repo: daaain/claude-code-log PR: 196
File: pyproject.toml:25-25
Timestamp: 2026-06-03T18:35:03.078Z
Learning: In the `claude-code-log` project (`pyproject.toml`), the maintainer prefers open-ended minimum-version constraints (e.g., `>=x.y.z`) over adding upper bounds for dependencies. They rely on `uv.lock` for reproducible pinning and prefer to let library consumers (e.g., Nixpkgs) decide compatibility. Do not suggest adding upper bounds to dependency constraints in this project.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
|
I'm not really sure why did I pin it, but we have better test coverage since and CI is all green, so I'll merge. |
|
This is now released together with the version flag in https://github.com/daaain/claude-code-log/releases/tag/1.4.0 |
It's unclear why #40 changed this from
>=to==in the first place, rather than just updating the version inuv.lock.As far as I can tell, the only breaking changes since Textual 6.5.0 were the following two, neither of which affect this tool:
Relaxing this constraint will make it easier to package this tool in Nixpkgs, since without it,
pythonRelaxDeps = [ "textual" ]is required because the Textual version in Nixpkgs is currently 8.2.7.Summary by CodeRabbit